﻿using System.IO;
using System.Text;

class Encodings
{
    private const string INPUT_FILE_NAME = @"..\..\..\Encodings\input.txt";
    private const string OUTPUT_FILE_NAME = @"..\..\..\Encodings\output.txt";

    public static void Main()
    {
        StreamReader input = new StreamReader(INPUT_FILE_NAME, Encoding.GetEncoding("windows-1251"));
        using (input)
        {
            StreamWriter output = new StreamWriter(OUTPUT_FILE_NAME, false, Encoding.UTF8);
            using (output)
            {
                while (!input.EndOfStream)
                {
                    string line = input.ReadLine();
                    output.WriteLine(line);
                }
            }
        }
    }
}
